package com.javarush.test.level04.lesson16.home02;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Solution
{
    public static void main(String[] args)   throws Exception
    {
        //Напишите тут ваш код
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        String sOne = reader.readLine();
        String sTwo = reader.readLine();
        String sThree = reader.readLine();
        
        int one = Integer.parseInt(sOne);
        int two = Integer.parseInt(sTwo);
        int three = Integer.parseInt(sThree);
        
        if (one > two && one < three || one < two && one > three)
            System.out.println(one);
        else if (two > one && two < three || two < one && two > three)
            System.out.println(two);
        else if (three > one && three < two || three < one && three > two)
            System.out.println(three);
    }
}
